﻿@model IEnumerable<ElCharro01.Models.Category>

@{
    ViewBag.Title = "ListCategory";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}

<h2>ListCategory</h2>

<p>
    
</p>
<table>
    <tr>
        <th>Nome</th>
        <th></th>
        <th colspan="2">@Html.ActionLink("Aggiungi Categoria", "AddCategory","Category")</th>
    </tr>

@foreach (var category in Model) {
    <tr>
      <td>
            @category.Nome
      </td>
      <td style="width:50px;">
          @Html.ActionLink("Edit", "EditCategory", new { id = category.Id }) 
      </td>
      <td style="width:50px;">
          @Html.ActionLink("Details", "Details", new { id = category.Id }) 
      </td>
      <td style="width:50px;">
          @Html.ActionLink("Cancella", "DeleteCategory", "Category", new { id = category.Id }, new { })
      </td>
    
    </tr>
}

</table>

